<?php 
	$this->load->view('header');
	$this->load->view('header_end');
	$this->load->view('part_view/mod_banner_header'); 
?>
<div id="block_menu_banner">
	<?php 
		$this->load->view('part_view/mod_menu_top'); 
	?>
</div>
<div id="content_block">
	<div id="left_column">
		<?php 
			$this->load->view('part_view/mod_check_search'); 
		?>
	</div>
	<div id="main_column_product">
		<div class="block_product">
			<div class="top_bar">
				<h3 class="title_page">
					<?php
						$material = Obj_get_material_product_byid($menu_sec) ;
						foreach($material as $sec):
						echo $sec['cmaterial_products'];
						endforeach; 
					?>
				</h3>
				<div class="clear"></div>
			</div>
			<div class="content_box">
				<div class="list_items">
					<?php  
						$data_list	= $data_list_by_matid;
						$count = 1;
						$num_colum = 5;	
						foreach($data_list as $data): 
					?>
					<?php if($count > 1 && $count%$num_colum == 1): ?>
					</div>
					<?php endif; ?>
					<?php if($count == 1 OR $count%$num_colum == 1 ): ?>
					<div class="row_product">
					<?php endif; ?>
						<?php if($count > 1 && $count%5==0): ?>
						<div class="item_product border_product last">
						<?php else: ?>
						<div class="item_product border_product">
						<?php endif; ?>
							<?php if($data['cimage_resize'] !=''): ?>
							<p><a href="<?php echo base_url().'product/detail/'.$data['nid'] ?>" onMouseOver="ShowTooltip('<?php echo base_url()."ajax/ajax_product/getid/".$data['nid'];?>'); return false;" onMouseOut="HideTooltip();"><img src="<?php echo base_url().'upload/images_product/resize_images/'.$data['cimage_resize'] ?>" alt="<?php echo $data['cproducts'] ?>"/></a></p>
							<?php else: ?>
							<p><a href="<?php echo base_url().'product/detail/'.$data['nid'] ?>" onMouseOver="ShowTooltip('<?php echo base_url()."ajax/ajax_product/getid/1";?>'); return false;" onMouseOut="HideTooltip();"><img src="<?php echo base_url().'images/noimage.jpg'; ?>" alt="<?php echo $data['cproducts'] ?>" width="170" height="135" class="img_fade"/></a></p>
							<?php endif; ?>
							<h4><a href="<?php echo base_url().'product/detail/'.$data['nid'] ?>"><?php echo $data['cproducts'] ?></a></h4>
							<p class="price">
								<?php 
									if($data['fprice_sale'] != 0 && $data['fprice_sale'] != '')
										echo show_price($data['fprice_sale']).show_price_sale($data['fprice']);
									else
										echo show_price($data['fprice']);
								?>
							</p>
						</div>			
					<?php if($count == count($data_list)): ?>
					</div>
					<?php endif; ?>
					<?php
						$count++;  
						endforeach; 
					?>
				</div>
				<div class="pagination">
				<?php
					if($get_page != '')
						echo $get_page; 
				?>
				</div>
				<div class="clear"></div>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
	function add_cart(nid)
	{	
		addToBasket(nid);
		setTimeout("submit3("+nid+")",1000);
	}
	function submit3(nid)
	{
		f_form	= "frmProduct"+nid;
		document.forms[f_form].submit();
	}
	function call_cart()
	{
		alert(' <?php 
			$obj_data = get_config_byid(7);
			if(count($obj_data)>0):
				foreach($obj_data as $data):
					echo $data['cnote'];
				endforeach;
			endif;
		 ?>
');
	}

</script>
<?php 
	$this->load->view('part_view/mod_home_slide_bottom'); 
	$this->load->view('part_view/mod_footer_content');  
	$this->load->view('footer');
?>

